package com.imooc.bigdata.hos.core.authmgr;

import com.imooc.bigdata.hos.core.HosException;

/**
 * @author liyuhui
 * @date {DATE}
 * @description
 */
public class HosAuthrmgrException extends HosException{
    private int code;
    //todo 明明父类里有errorMessage，为什么还要定义一个message
    private String message;

    public HosAuthrmgrException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.message = message;
    }

    public HosAuthrmgrException(int code, String message) {
        this(code,message,null);
//        super(message, null);
//        this.code = code;
//        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public int errorCode() {
        return this.code;
    }
}
